Register suggest_query_params in core - #223
Conversation
Move the suggest_query_params tool from the Alliance overlay into core (src/core/server/tools/) and register it in setupCoreServerOnContext, so a core-initialized server can expose it. The tool only imported from core/server, so this is a clean move; Alliance still gets it via the core setup it calls, and its now-duplicate registration is removed. Deliberately narrow per the issue: no change to the disableSuggestFlow default (core stays gate-off, guided_query first) or to CORE_SERVER_INSTRUCTIONS, and Alliance behaviour is unchanged. Adds a core-registration test and updates the RC-readiness core tool list.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCore setup now registers ChangesCore suggest query registration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CoreSetup
participant CoreToolSurface
participant SuggestTool
participant MCPServer
CoreSetup->>CoreToolSurface: register core tools
CoreToolSurface->>SuggestTool: register suggest_query_params
SuggestTool->>MCPServer: expose callable tool
MCPServer-->>CoreSetup: return successful suggestion response
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #223 +/- ##
=======================================
Coverage ? 85.07%
=======================================
Files ? 46
Lines ? 2399
Branches ? 826
=======================================
Hits ? 2041
Misses ? 357
Partials ? 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/__tests__/cross-entry-point.test.ts`:
- Around line 124-140: Extend the test around setupCoreServer and
registerSuggestQueryParamsTool to invoke the registered suggest_query_params
tool through the initialized server context, not just spy on registration.
Assert the tool is exposed and callable, then validate its returned response
while preserving the existing registration assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 24fd60f0-45a7-446a-a967-1ab49a9f695b
📒 Files selected for processing (8)
src/__tests__/cross-entry-point.test.tssrc/__tests__/mcp-rc-readiness.test.tssrc/alliance/setup.tssrc/core/server/tools/guided-query-tool.context.test.tssrc/core/server/tools/suggest-query-params-tool.context.test.tssrc/core/server/tools/suggest-query-params-tool.test.tssrc/core/server/tools/suggest-query-params-tool.tssrc/core/setup.ts
💤 Files with no reviewable changes (1)
- src/alliance/setup.ts
…liance#221 review) The cross-entry-point test proves core setup invokes the registrar; add a callTool round-trip in the RC-readiness harness so a core-initialized server actually exposes and executes suggest_query_params (asserts status success + namespace_found). A broken registration can no longer pass by only being listed.
…view) suggest_query_params is now registered in core, so update the docs that still called it Alliance-specific: the setupCoreServer docblock (nine core tools, ten with multi-source list_sources; tool registered but the suggest-flow gate stays off by default for core), the CORE_SERVER_INSTRUCTIONS docstring and the setupAllianceServer docblock, and the Core-vs-Alliance table + gate paragraph in TOOLS.md. Alliance's Boost/Slack URL generators are clarified as generate_urls registry entries, not a separate MCP tool. PACKAGE_SPLIT_EVAL.md left as a point-in-time eval.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/TOOLS.md`:
- Around line 30-37: The core-facing metadata for suggest_query_params still
describes the call as mandatory despite the default disabled gate. Update the
registration description in suggest-query-params-tool.ts so it states the step
is mandatory only when the suggest-flow gate is enabled, while describing it as
optional when the gate is disabled; preserve the existing Alliance-enabled
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 40b1d3fd-30ab-4157-8204-63bbeede926a
📒 Files selected for processing (5)
docs/TOOLS.mdsrc/__tests__/mcp-rc-readiness.test.tssrc/alliance/setup.tssrc/constants.tssrc/core/setup.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/core/setup.ts
- src/alliance/setup.ts
…tate The tool description said the call is mandatory before query/count tools unconditionally, but core registers the tool with the suggest-flow gate off by default. Say it's required only when the gate is enabled (Alliance default) and optional otherwise, matching the gate paragraph in TOOLS.md.
Closes #221.
suggest_query_paramswas registered only in the Alliance overlay, so a core-initialized server could not expose it without pulling in Alliance. This moves the tool into core and registers it there.What changed
suggest-query-params-tool.ts(and its two co-located tests) fromsrc/alliance/tools/tosrc/core/server/tools/. The tool only imported fromcore/server, so the move is clean and removes a core test that was reaching across intoalliance/.setupCoreServerOnContext(afterguided_query).alliance/setup.ts— Alliance still gets the tool via the core setup it calls, so no double-registration.Scope (deliberately narrow)
disableSuggestFlowdefault — core stays gate-off,guided_queryfirst.CORE_SERVER_INSTRUCTIONS.The core/Alliance gate defaults and ceremony settled in #159/#160 are not revisited here.
Tests
Added a
core setup registers suggest_query_paramsassertion (mirrors the existingguided_queryone) and updated the RC-readiness core tool list. Full CI gate passes locally (typecheck, lint, format, build, benchmark smoke, 368 tests, coverage above thresholds).Summary by CodeRabbit
suggest_query_paramstool to the core server tool surface.suggest_query_paramsinvocation.docs/TOOLS.mdand core tool-count/gating rules to reflect thesuggest_query_paramstool and gate behavior.